import { _decorator, Component, Node } from 'cc'
const { ccclass, property } = _decorator

/**
 * Predefined variables
 * Name = Constant
 * DateTime = Mon Feb 14 2022 20:13:44 GMT+0800 (中国标准时间)
 * Author = ashscc
 * FileBasename = Constant.ts
 * FileBasenameNoExtension = Constant
 * URL = db://assets/script/framework/Constant.ts
 * ManualUrl = https://docs.cocos.com/creator/3.4/manual/en/
 *
 */

export class Constant {
  //敌机类型，两种
  public static EnemyPlaneType = {
    TYPE1: 1, //敌机类型1
    TYPE2: 2, //敌机类型2
  }
  //敌机出现的组合方式三种
  public static CombinationType = {
    PLANE1: 1, //随机出现一架TYPE1或者TYPE2的敌机   0-10s
    PLANE2: 2, //随机出现五个一排的TYPE1或者TYPE2的敌机 或者 PLANE1 10s-20s
    PLANE3: 3, //随机出现七个人字形的飞机 或者 PLANE2 或者 PLANE3   20s+
  }
  //碰撞类型分组
  public static CollisionType = {
    SELF_PLAYER: 1 << 1, //玩家飞机
    ENEMY_PLAYER: 1 << 2, //敌机
    SELF_BULLET: 1 << 3, //玩家子弹
    ENEMY_BULLET: 1 << 4, //敌机子弹
    BULLET_PROP: 1 << 5, //子弹buf
  }
  //子弹buf类型
  public static BulletPropType = {
    BULLET_M: 1,
    BULLET_H: 2,
    BULLET_S: 3,
  }
  //子弹类型
  public static BulletType = {
    LEFT: 1,
    MIDDLE: 2,
    RIGHT: 3,
  }
}

/**
 * [1] Class member could be defined like this.
 * [2] Use `property` decorator if your want the member to be serializable.
 * [3] Your initialization goes here.
 * [4] Your update function goes here.
 *
 * Learn more about scripting: https://docs.cocos.com/creator/3.4/manual/en/scripting/
 * Learn more about CCClass: https://docs.cocos.com/creator/3.4/manual/en/scripting/decorator.html
 * Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.4/manual/en/scripting/life-cycle-callbacks.html
 */
